package cn.francis.common.constant;

/**
 * @author 张俊辉
 */

public class AsyncConfigurationConstants {
    /**
     * 获取服务器的cpu个数
     */
    public static final int CPU_COUNT = Runtime.getRuntime().availableProcessors();
    /**
     * 核心线程数量
     */
    public static final int CORE_SIZE = CPU_COUNT * 2;
    /**
     * 线程最大数量
     */
    public static final int MAX_CORE_SIZE = CORE_SIZE * 4;
    /**
     * 缓存队列
     */
    public static final int QUEUE_CAPACITY_SIZE = MAX_CORE_SIZE * 2 * 50;
    /**
     * 设置线程的空闲时间,当超过了核心线程出之外的线程在空闲时间到达之后会被销毁
     */
    public static final int KEEP_ALIVE_TIME = 60;
    /**
     * 异步方法内部线程名称
     */
    public static final String THREAD_NAME_PREFIX = "Include-Async-Thread-";
}
